package world.xuewei.model.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.io.Serializable;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonIgnoreProperties({"handler", "hibernateLazyInitializer", "fieldHandler"})
/**
 * 订单主表(Orders)实体类
 *
 * @author makejava
 * @since 2024-11-16 15:40:07
 */
public class Orders implements Serializable {
    private static final long serialVersionUID = -77128415691599606L;
    /**
     * 订单ID
     */
    private Long id;
    /**
     * 订单号
     */
    private String orderNumber;
    /**
     * 用户ID
     */
    private Long userId;
    /**
     * 商户ID
     */
    private Long merchantId;
    /**
     * 订单总金额
     */
    private BigDecimal totalAmount;
    /**
     * 实付金额
     */
    private BigDecimal payAmount;
    /**
     * 配送方式：0-外送 1-自取
     */
    private Integer deliveryType;

    /**
     * 收货地址ID
     */
    private Long addressId;
    /**
     * 订单状态：-1-已取消 0-待付款 1-待发货 2-已发货 3-已完成
     */
    private Integer orderStatus;
    /**
     * 支付时间
     */
    private Date payTime;
    /**
     * 订单备注
     */
    private String remark;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 更新时间
     */
    private Date updateTime;


    /**
     * 收货地址信息
     */
    private Address address;
    
    /**
     * 订单项列表
     */
    private List<OrderItem> orderItems;

    // 商户信息
    private MerchantInfo merchantInfo;
}

